<template>
  <div>
    <h3>这是expose组件</h3>
    <Child ref="c" />
  </div>
</template>

<script setup>
import { onMounted, ref } from "vue";
import Child from "../components/Child.vue";

const c = ref(null);

onMounted(()=>{
  console.log(c.value);
  console.log(c.value.n);
  console.log(c.value.add);
})
</script>